<html>
<head>
	<title>Excersise 1</title>
	<!--<link href="styles/js-console.css" rel="stylesheet" /> -->
</head>
<body>
	<div id="js-console"></div>
	<!--<script src="scripts/js-console.js"></script> -->
	<script>
function Solve(args)
{
var pts = new Array;
var i, j;
var currentWin = 0;
var absoluteWin = 0;
var numberN = parseInt(args[0]);
var a, b;
for(i=1;i<args.length;i++)
{
pts[i-1] = parseInt(args[i]);
}
pts.sort(function(a,b){return a - b})
for(j=0;j<(pts.length-1);j++)
{
	if (pts[j]===pts[j+1])
	{
		currentWin++;
		if (currentWin>absoluteWin)
		{
		absoluteWin = currentWin;
		}
	}
	else
	{
		currentWin = 0;
	}
}

return pts[absoluteWin];
}
	</script>
</body>
</html>
